//
//  Defect.m
//  Audit
//
//  Created by fenggu07 on 15/2/12.
//  Copyright (c) 2015年 cc. All rights reserved.
//

#import "Defect.h"

@implementation Defect

- (id)initWithInfo:(NSDictionary *)info {
    
    if (!info && [info isKindOfClass:[NSDictionary class]]) {
        return nil;
    }
    
    self = [super init];
    
    if (self) {
        self.vehicleId    = [info objectForKey:@"vehicleId"];//CARpkID
        self.auditId         = [info objectForKey:@"auditId"];//部件
        self.part         = [info objectForKey:@"partListValue"];//部件
        self.partDesc         = [info objectForKey:@"partValue"];//部件
        self.part2        = [info objectForKey:@"partListValue2"];//部件
        self.part2Desc        = [info objectForKey:@"partValue2"];//部件
        self.defect       = [info objectForKey:@"audit"];//缺陷
        self.defectDesc       = [info objectForKey:@"audit_value"];//缺陷
        self.location     = [info objectForKey:@"location"];//位置
        self.locationDesc     = [info objectForKey:@"location_value"];//位置
        self.weight       = [info objectForKey:@"weight"];//权重
        self.weightDesc       = [info objectForKey:@"weight_value"];//权重
        self.zone         = [info objectForKey:@"zone"];//区域
        self.zoneDesc         = [info objectForKey:@"zone_value"];//区域
        self.resparea     = [info objectForKey:@"respArea"];//责任部门
        self.respareaDesc     = [info objectForKey:@"respArea_value"];//责任部门
        self.repairFlag   = [info objectForKey:@"repairFlag"];//返修
        self.senseFlag    = [info objectForKey:@"senseFlag"];//感知
//        self.uploadedFile = [info objectForKey:@""];//图片
        self.fileName    = [info objectForKey:@"fileName"];//返修
        self.fileLink    = [info objectForKey:@"fileLink"];//感知
    }
    
    return self;
}

@end
